package com.notice.service;

import com.notice.dao.CommentDao;
import com.notice.entity.Comments;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService {
    @Autowired
    private CommentDao commentDao;

    public Boolean Add(Comments c){
        return commentDao.Add(c)==1;
    }

    public Boolean Update(Comments c){
        return commentDao.Update(c)==1;
    }

    public Boolean Delete(Comments c){
        return commentDao.Delete(c)>0;
    }

    public List<Comments> Find(Comments c){
        return commentDao.FindAll(c);
    }
}
